<template>
  <div>
    <!--    面包屑导航-->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>权限管理</el-breadcrumb-item>
      <el-breadcrumb-item>权限列表</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card>
      <!-- 用户列表 start-->
      <el-table
          :data="authList"
          style="width: 100%"
          border stripe>
        <el-table-column type="index" width="50" label="#"></el-table-column>
        <el-table-column
            prop="menuName"
            label="权限名称"
            width="180">
        </el-table-column>
        <el-table-column
            prop="url"
            label="权限"
            width="180">
        </el-table-column>
        <el-table-column
            prop="orderid"
            label="级别" width="160">
        </el-table-column>
        <el-table-column
            prop="createTime"
            label="创建时间"
            width="180">
          <template v-slot="scope">
            {{ scope.row.createTime | fmtdate }}
          </template>
        </el-table-column>
      </el-table>
      <!-- 用户列表 end-->
    </el-card>
  </div>
</template>

<script>
export default {
  name: "AuthList",
  data() {
    return {
      authList: []
    }
  },
  created() {
    this.getAuthList()
  },
  methods:{
    async getAuthList(){
      const {data:res}=await this.$axios.get("menu/list")
      this.authList=res.data
    }
  }
}
</script>

<style scoped>
.el-card {
  margin-top: 15px;
}

.el-table {
  margin-top: 15px;
}
</style>